	<!-- $Id: order_info.htm 17060 2010-03-25 03:44:42Z liuhui $ -->

<?php echo $this->fetch('pageheader.htm'); ?>
<?php echo $this->smarty_insert_scripts(array('files'=>'topbar.js,../js/utils.js,listtable.js,selectzone.js,../js/common.js')); ?>
<?php if ($this->_var['user']): ?>
<div id="topbar">
  <div align="right"><a href="" onclick="closebar(); return false"><img src="images/close.gif" border="0" /></a></div>
  <table width="100%" border="0">
    <caption><strong> <?php echo $this->_var['lang']['buyer_info']; ?> </strong></caption>
    <tr>
      <td> <?php echo $this->_var['lang']['email']; ?> </td>
      <td> <a href="mailto:<?php echo $this->_var['user']['email']; ?>"><?php echo $this->_var['user']['email']; ?></a> </td>
    </tr>
    <tr>
      <td> <?php echo $this->_var['lang']['user_money']; ?> </td>
      <td> <?php echo $this->_var['user']['formated_user_money']; ?> </td>
    </tr>
    <tr>
      <td> <?php echo $this->_var['lang']['pay_points']; ?> </td>
      <td> <?php echo $this->_var['user']['pay_points']; ?> </td>
    </tr>
    <tr>
      <td> <?php echo $this->_var['lang']['rank_points']; ?> </td>
      <td> <?php echo $this->_var['user']['rank_points']; ?> </td>
    </tr>
    <tr>
      <td> <?php echo $this->_var['lang']['rank_name']; ?> </td>
      <td> <?php echo $this->_var['user']['rank_name']; ?> </td>
    </tr>
    <tr>
      <td> <?php echo $this->_var['lang']['bonus_count']; ?> </td>
      <td> <?php echo $this->_var['user']['bonus_count']; ?> </td>
    </tr>
  </table>
 
</div>
<?php endif; ?>


<div class="list-div" style="margin-bottom: 5px">
<table width="100%" cellpadding="3" cellspacing="1">
 <!--  <tr>
    <td colspan="4">
      <div align="center">
        <input name="prev" type="button" class="button" onClick="location.href='order.php?act=info&order_id=<?php echo $this->_var['prev_id']; ?>';" value="<?php echo $this->_var['lang']['prev']; ?>" <?php if (! $this->_var['prev_id']): ?>disabled<?php endif; ?> />
        <input name="next" type="button" class="button" onClick="location.href='order.php?act=info&order_id=<?php echo $this->_var['next_id']; ?>';" value="<?php echo $this->_var['lang']['next']; ?>" <?php if (! $this->_var['next_id']): ?>disabled<?php endif; ?> />
        <input type="button" onclick="window.open('order.php?act=info&order_id=<?php echo $this->_var['order']['order_id']; ?>&print=1')" class="button" value="<?php echo $this->_var['lang']['print_order']; ?>" />
    </div></td>
  </tr> -->
  <tr>
    <th colspan="4"><?php echo $this->_var['lang']['base_info']; ?></th>
  </tr>
  <tr>
    <td width="18%"><div align="right"><strong><?php echo $this->_var['lang']['label_order_sn']; ?></strong></div></td>
    <td width="34%"><?php echo $this->_var['order']['order_id']; ?>
	</td>
    <td width="15%"><div align="right"><strong>羊只品种</strong></div></td>
    <td><?php echo $this->_var['order']['sheep_pinzhong']; ?></td>
  </tr>
<!--   <tr>
    <td><div align="right"><strong><?php echo $this->_var['lang']['label_user_name']; ?></strong></div></td>
    <td><?php echo empty($this->_var['order']['user_name']) ? $this->_var['lang']['anonymous'] : $this->_var['order']['user_name']; ?> <?php if ($this->_var['order']['user_id'] > 0): ?>[ <a href="" onclick="staticbar();return false;"><?php echo $this->_var['lang']['display_buyer']; ?></a> ] [ <a href="user_msg.php?act=add&order_id=<?php echo $this->_var['order']['order_id']; ?>&user_id=<?php echo $this->_var['order']['user_id']; ?>"><?php echo $this->_var['lang']['send_message']; ?></a> ]<?php endif; ?></td>
    <td><div align="right"><strong><?php echo $this->_var['lang']['label_order_time']; ?></strong></div></td>
    <td><?php echo $this->_var['order']['formated_add_time']; ?></td>
  </tr> 
  <tr>
    <td><div align="right"><strong><?php echo $this->_var['lang']['label_payment']; ?></strong></div></td>
    <td><?php if ($this->_var['order']['pay_id'] > 0): ?><?php echo $this->_var['order']['pay_name']; ?><?php else: ?><?php echo $this->_var['lang']['require_field']; ?><?php endif; ?><a href="order.php?act=edit&order_id=<?php echo $this->_var['order']['order_id']; ?>&step=payment" class="special"><?php echo $this->_var['lang']['edit']; ?></a>
    (<?php echo $this->_var['lang']['action_note']; ?>: <span onclick="listTable.edit(this, 'edit_pay_note', <?php echo $this->_var['order']['order_id']; ?>)"><?php if ($this->_var['order']['pay_note']): ?><?php echo $this->_var['order']['pay_note']; ?><?php else: ?>N/A<?php endif; ?></span>)</td>
    <td><div align="right"><strong><?php echo $this->_var['lang']['label_pay_time']; ?></strong></div></td>
    <td><?php echo $this->_var['order']['pay_time']; ?></td>
  </tr>-->
  <tr>
    <td><div align="right"><strong>下单时间：</strong></div></td>
    <td><?php echo $this->_var['order']['add_time']; ?></td>
    <td><div align="right"><strong>购买人信息：</strong></div></td>
    <td>
	用户名：<?php echo $this->_var['user']['user_name']; ?><br/>
	实名：<?php echo $this->_var['order']['smname']; ?><br/>
	身份证：<?php echo $this->_var['order']['smsfz']; ?><br/>
	手机号：<?php echo $this->_var['order']['mobile_phone']; ?><br/>
	</td>
  </tr>


</table>
</div>

<div class="list-div" style="margin-bottom: 5px">
<table width="100%" cellpadding="3" cellspacing="1">
  <tr>
    <th colspan="8" scope="col">羊只信息</th>
    </tr>
  <tr>
    <td scope="col"><div align="center"><strong>羊只名称</strong></div></td>
    <td scope="col"><div align="center"><strong>品种</strong></div></td>
    <td scope="col"><div align="center"><strong>图片</strong></div></td>
    <td scope="col"><div align="center"><strong>单价</strong></div></td>
    <td scope="col"><div align="center"><strong>数量</strong></div></td>
    <td scope="col"><div align="center"><strong>总价</strong></div></td>
    <td scope="col"><div align="center"><strong>羊只耳号</strong></div></td>
   
  </tr>

  <tr>
    <td><a href="../sheep.php?act=details&id=<?php echo $this->_var['goods']['sheep_id']; ?>" target="_blank"><?php echo $this->_var['goods']['sheep_name']; ?></td>
    <td><?php echo $this->_var['goods']['sheep_pinzhong']; ?></td>
    <td><img src="../<?php echo $this->_var['goods']['logo_img']; ?>" width="100px"  /></td>
    <td><div align="center"><?php echo $this->_var['goods']['price']; ?></div></td>
    <td><div align="center"><?php echo $this->_var['order']['sheep_number']; ?></div></td>
    <td><?php echo $this->_var['order']['sheep_price']; ?></td>
    <td><div align="center">
	<form action="sheep_list.php?act=geterhao" method="post" name="theForm">
		<?php $_from = $this->_var['goods']['goods_arrs']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('keys', 'items');if (count($_from)):
    foreach ($_from AS $this->_var['keys'] => $this->_var['items']):
?>
			<?php if ($this->_var['items']['erhao']): ?>
			<input type="text" name="sheep_erhao[<?php echo $this->_var['items']['id']; ?>]" value="<?php echo $this->_var['items']['erhao']; ?>"><br/>
			<?php else: ?>
			<input type="text" name="sheep_erhao[]" value=""><br/>
			<?php endif; ?>
		<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
		<input type="hidden" name="order_id" value="<?php echo $this->_var['order']['order_id']; ?>">
		<input type="hidden" name="acts"  value="<?php echo $this->_var['acts']; ?>">
		 <input name="assign" type="submit" value="更新耳号" class="button" />
	</form>
	</div></td>
 
  </tr>

 
</table>
</div>

 
 

<script language="JavaScript">

  var oldAgencyId = <?php echo empty($this->_var['order']['agency_id']) ? '0' : $this->_var['order']['agency_id']; ?>;

  onload = function()
  {
    // 开始检查订单
    startCheckOrder();
  }

  /**
   * 把订单指派给某办事处
   * @param int agencyId
   */
  function assignTo(agencyId)
  {
    if (agencyId == 0)
    {
      alert(pls_select_agency);
      return false;
    }
    if (oldAgencyId != 0 && agencyId == oldAgencyId)
    {
      alert(pls_select_other_agency);
      return false;
    }
    return true;
  }
</script>


<?php echo $this->fetch('pagefooter.htm'); ?>